<!--{include control/admin/tpl/admin_header}-->
	<div class="page_title">
    	<h1>{$_lang['pay_manage']}</h1>
        <div class="tool">
            <a href="{BASE_URL}/index.php/admin/config_pay"  >{$_lang['pay_config']}</a>
			<a href="{BASE_URL}/index.php/admin/config_pay/online" class="here" >{$_lang['online_pay_interface']}</a>
			<a href="{BASE_URL}/index.php/admin/config_pay/offline" >{$_lang['line_pay_interface']}</a>
    	</div>
    </div>
<div class="box post">
	<div class="tabcon">
        	<div class="title"><h2>{$payment_config['pay_name']}{$_lang['config_payment_interface']}</h2></div>
            <div class="detail">
                <form name="frm_config_basic" id="frm_config_basic" action="{BASE_URL}/index.php/admin/config_pay/online_save" method="post" >    
                   <input type="hidden" name="formhash"   value="{FORMHASH}">
				   <input type="hidden" name="hdn_pay_id" value="{$payment_config['pay_id']}">
				    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <th scope="row" width="160">{$_lang['interface_name']}:</th>
                        <td>{$payment_config['pay_name']}</td>
                      </tr>
                      <tr>
                        <th scope="row"> {$_lang['is_enabled']}:</th>
                        <td>
                        	<label for="rdo_pay_status1"><input type="radio" id="rdo_pay_status1" name="fds[status]" {if $payment_config['status']} checked="checked" {/if}  value="1">{$_lang['open']}</label>
                            <label for="rdo_pay_status2"><input type="radio" id="rdo_pay_status2" name="fds[status]" {if !$payment_config['status']} checked="checked" {/if} value="0">{$_lang['close']}</label></td>
                      </tr>
					  {loop $items $v}
					   
						<tr>
		                   <th scope="row" width="180px">{$v['name']}:</th>
			               <td>
			                    <input type="text" name="fds[{$v['k']}]" value="{$v['v']}" class="txt" style=" width:260px;"/>
								
								{if $payment_config['payment'] =='alipayjs'&&$v['k']=='account'}
									<button class="pill" type="button" onclick="getPidKey(this);">
										<span class="icon plus">&nbsp;</span>
										{$_lang['get_pid_key']}
									</button>
									<script type="text/javascript">
										function getPidKey(obj){
											var par = $(obj).prev();
											var acc = $.trim(par.val());
												if(acc){
													window.open("https://b.alipay.com/order/pidKey.htm?pid=2088501217834340&product=fastpay","_blank");
												}else{
													art.dialog.alert("{$_lang['enter_your_alipay_account']}");
												}
										}
									</script>
								{/if}
								 
						  </td>
					   </tr>
					  {/loop}		
			  		 
					  <tr>
                        <th scope="row"> {$_lang['interface_description']}:</th>
                        <td><textarea name="fds[mem]" cols="100" rows="5">{$payment_config['mem']}</textarea></td>
                      </tr>
                      <tr>
                        <th scope="row">&nbsp;</th>
                        <td>
                            <div class="clearfix padt10">
                                <button class="positive pill primary button" type="submit" onclick="return checkForm(document.getElementById('frm_config_basic'),false)"  name="sbt_edit" ><span class="check icon"></span>{$_lang['submit']}</button>
                                <button class="pill button" type="button" onclick="to_back();" value="{$_lang['return']}"><span class="uparrow icon"></span>{$_lang['return']}</button>
                            </div>
                        </td>
                      </tr>
                      </tbody>
                    </table>
                    
                </form>
            </div>
        </div>
</div>

<!--{include control/admin/tpl/admin_footer}-->
